Migrating from Microsoft FrontPage to Macromedia Dreamweaver MX 2004
Charles Nadeau
Macromedia
If you’re a Microsoft FrontPage user, you can easily migrate to Macromedia Dreamweaver MX 2004. Even though Dreamweaver is a more feature-rich product than FrontPage, it’s friendly enough for you to jump right in.
You can download a 30-day trial version of Dreamweaver from the Macromedia website and start building websites right away. The full-featured trial version lets you become familiar with the product before making the decision to switch from FrontPage.
Suggested Requirements
To complete this tutorial, we recommend that you install the following software and files:
Macromedia Dreamweaver MX 2004
Introducing the Dreamweaver Workspace
The integrated Dreamweaver MX 2004 workspace consists of five main parts: the Start page, the Document window, the Property inspector, a series of panels organized in groups, and the Insert bar.
Figure 1a. The Dreamweaver workspace
The Start page appears in the Document window after you start Dreamweaver or when you don’t have any documents open. The Start page lets you open a recent document or create a new document with one click.
Figure 1b. The Start page
The Document window is the equivalent of the Page view in FrontPage: it displays the page or pages you’re working on. It can display your documents as tabbed windows or floating windows. To view your pages as tabbed windows, maximize one of the open pages by clicking the Maximize button in the Document window’s title bar. To view your documents as floating windows, minimize one of the open pages.
The Normal and HTML panes in FrontPage 2003 have been renamed Design view and Code view like in Dreamweaver, and they serve identical purposes. You can edit a page visually in Design view or you can edit its source code in Code view. To switch to Code view in Dreamweaver, select View > Code or click the Code button on the toolbar.
Figure 2. The Code view button
Dreamweaver, like FrontPage 2003, lets you work in Design view and Code view at the same time. To display both views at the same time, select View > Code and Design, or click the Split button on the toolbar.
Dreamweaver also has a version of the FrontPage Preview pane called the Preview in Browser command. To use it, select View > Preview in Browser, or press F12. The page opens in the browser of your choice. For more information, see "Previewing and testing pages in browsers" in Using Dreamweaver Help.
The Property inspector below the Document window lets you view and change the properties of text or other elements on the page. It’s roughly equivalent to the Formatting toolbar in FrontPage, except that you can use it for page elements other than text. For example, you can use the Property inspector to set the width and alignment properties of a table row.
Figure 3. The Property inspector
Panel groups are sets of related panels. The panels provide the tools you need to build any kind of web page you want, including database-powered pages. The panels also give you tools to manage every aspect of your site, including file transfer and source control. Here’s the panel you use to create CSS styles:
Figure 4. The CSS Panel
The Files panel corresponds to the Folders view in FrontPage. To open the Files panel, select Window > Files, or press F8.
Figure 5. The Styles Panel
The Insert bar contains buttons for inserting various types of page elements, including images, tables, and layers. The various views of the Insert bar are roughly equivalent to the various toolbars in FrontPage, except that they correspond more closely to web concepts and technologies. (The FrontPage toolbars share a close family resemblance with the Microsoft Word toolbars, developed for word processing.)
Figure 6. The Insert bar
Streamlining Your Workspace
With its numerous panels and features, the Dreamweaver workspace can be intimidating at first. You might never use some of the panels, or use them only rarely. Fortunately you can streamline the workspace and customize it to fit the way you work.
You can close panel groups you rarely use. For example, you might not do much application development, so for you, the Application panel group is superfluous. To close it, right-click the group’s title bar and select Close Panel Group from the shortcut menu.
Figure 7. The Close panel group contextual menu
You can move individual panels to other groups by selecting a panel, right-clicking the group’s title bar, selecting "Group [PanelName] With" from the shortcut menu, and selecting a new panel group. To give yourself maximum elbow room while working, you can hide all the panels and toolbars at once by pressing F4. Press F4 again to bring back the panels and toolbars.
Setting Up a Web and Managing Files
In FrontPage, you create a Web to organize your site files and folders. You do the same thing in Dreamweaver, only it’s called defining a Dreamweaver site. When you define a Dreamweaver site, you specify the local folder you want to use to store your working files. If you want, you can specify a remote folder on a web server where you want to publish or test your files, and the method you want Dreamweaver to use to transfer the files to this folder. Dreamweaver can transfer files using a network or FTP. A Dreamweaver site is very similar to a FrontPage Web: It’s a way to organize and manage all the files for your website.
You can use the Site Definition Wizard to define a Dreamweaver site. The Wizard steps you through the setup process.
To use the Site Definition Wizard to set up a Dreamweaver site:
On the Start page, click Dreamweaver Site.
Figure 8. The create new Dreamweaver site link
The Site Definition dialog box appears.
Note: If you don’t see the Start page, close all open documents.
Click the Basic tab if it’s not already showing.
The first screen of the Site Definition Wizard appears.
Figure 9. The Site Definitions Dialog box
- Answer the questions on each screen and then click Next to advance. Click Back to return to a previous screen, if necessary.
For more information about any of the setup options, see Using Dreamweaver Help. After you complete the Wizard, your new Dreamweaver site appears in the Files panel (Window > Files).
Figure 10. The Files panel containing a site
If you specified a remote folder, you can view the files and folders it contains by selecting Remote View on the Files panel.
Figure 11. Switching to Remote view
If you specified FTP to transfer files to the remote folder, connect to the remote folder by clicking the Connect to Remote Host button on the Files panel toolbar.
Figure 12. The connection button in the Files panel
To upload a file from the local folder to the remote folder, select the file in the Files panel’s Local View and click the Put File(s) button (the blue up-arrow) on the panel toolbar. To download a file from the remote folder to your local folder, select the file in the Files panel’s Remote View and click the Get File(s) button (the green down-arrow) on the panel toolbar.
Working With Text
There are a number of ways to add text to a Dreamweaver document. You can type and format it directly in the Document window like in any text editor, or you can cut and paste it from other documents, including Microsoft Word or Microsoft Excel documents.
To format text:
Select it and then use the Property inspector to set its format properties.
Figure 13. The Property inspector showing text properties
Dreamweaver creates a CSS style based on the choices you make in the Property inspector. You can rename the style by opening the Style pop-up menu on the Property inspector and selecting Rename. You can apply your new style to any text selection in the page by selecting the text and then selecting the style in the Style pop-up menu. You don’t need to set the format properties again in the Property inspector.
Figure 14. Applying styles to text
To copy and paste from Word or Excel documents:
- In Word or Excel, select the content you want and press Control-C to copy it to the Clipboard.
- In Dreamweaver, click the web page where you want to insert the content and press Control-V. Dreamweaver converts the content to HTML and pastes it to your web page. You can format and edit the new content as desired.
To insert special characters like the trademark or Euro symbols:
- Select Insert > HTML > Special Characters.
- Select the special character from the pop-up menu to insert it in your page.
Working With Styles and Style Sheets
Styles are often used in FrontPage and Word to format text and paragraphs. If you’re used to working with styles, you can keep working with them in Dreamweaver.
Dreamweaver creates a CSS style when you format a text selection (see Working with text). CSS stands for Cascading Style Sheet, a web technology that gives you precise control over the appearance of your web pages. In addition to formatting text, CSS styles let you set margins, borders, float text around other text, and so on.
Like FrontPage or Word styles, CSS styles make it easy to update the formatting of your pages. When you update a CSS style, it automatically updates the formatting of all page elements using that style. In Dreamweaver, you can choose from numerous predefined CSS styles sheets or you can create your own styles.
To create a new style:
In the CSS Styles panel (Window > CSS Styles), click the New CSS Style button (+) on the bottom of the panel.
The New CSS Style dialog box appears.
Figure 15. The New CSS Style dialog box
Select a selector type.
Dreamweaver supports class selectors and tag selectors. A class selector defines a new named style, such as myBodyText. Once defined, you can apply the myBodyText style to any text selection.
A tag selector applies to all HTML tags of a particular type. For example, if you select the table row tag,
tr, and set thefontto Helvetica; this then applies the Helvetica font automatically to all table rows.Select the location where you want to define the new style, as follows:
- To define the style in a new external style sheet, select New Style Sheet File.
- To define the style in an existing style sheet attached to the current document, select the CSS file from the Define In pop-up menu.
- To embed the style in the current document, select This Document Only.
Click OK.
The New CSS Style dialog box closes and the Style Definition dialog box opens.
Figure 16. The CSS Style definition dialog box
- Use the Style Definition dialog box options to define the new CSS style.
When you’re done, click OK.
To use a predefined style sheet:
- Choose File > New to open the New Document dialog box.
- In the Category list, select CSS Style Sheets.
-
In the CSS Style Sheets list, select the style sheet you want. Dreamweaver displays a preview of the styles as well as a brief description of the style sheet.
Figure 17. The Styles preview dialog box
- To create the style sheet, click Create or double-click the item in the list. The style sheet appears in code format in the Document window.
Choose File > Save to save the document.
Before you can apply the styles defined in an external style sheet, you must attach the style sheet to your pages.
To attach a style sheet to your pages:
- Open a page and then open the CSS Styles panel (Window > CSS Styles).
Click the Attach Style Sheet button at the bottom of the CSS Styles panel.
Figure 18. The Attach Style Sheet button
- Browse to the style sheet and select it.
The individual styles appear in the CSS Styles panel. They also appear in the Style pop-up menu in the Property inspector.
Figure 19. The Property inspector style pop-up menu
To apply styles:
Click or select a page element and do one of the following:
- In the Property inspector, select the style from the Style pop-up menu.
- Right-click the selection in Design view and select the style from the CSS Styles submenu in the context menu.
- In the CSS Styles panel (Window > CSS Styles), right-click the style you want to apply and select Apply from the context menu.
To modify styles:
- In the CSS Styles panel (Window > CSS Styles), select the style you want to modify.
Click the Edit Style button at the bottom of the CSS Styles panel.
Figure 20. The Edit Style button
Modify the style attributes in the Style Definition dialog box.
Figure 21. The CSS Style Definition dialog box
- Click OK.
For more information, see the following topics in Using Dreamweaver Help:
- "Linking to or importing an external CSS style sheet"
- "Creating a new CSS style"
- "Editing a CSS style sheet"
- "Editing a CSS style"
Working with Images
Dreamweaver lets you easily insert and align images in your web pages. You can also crop, resize, and make minor edits to the images with the graphics editor built into Dreamweaver. In other words, you don’t have to leave Dreamweaver to make basic edits to your images.
To insert an image:
- Place the insertion point where you want the image to appear in the Document window and select Insert > Image.
- In the dialog box that appears, browse to and select the image you want to insert, and then click OK.
To align an image:
- Click the image on the page to select it.
- In the Property inspector, select an alignment option from the Align menu.
If you don’t see the Align box on the Property inspector, click the expander arrow on the bottom-right corner of the inspector.
To crop an image:
- Click the image on the page to select it.
In the Property inspector, click the Crop button.
Figure 22. The image editing tools on the Property inspector
Crop handles appear around the selected image and a dialog box appears informing you that you are permanently altering the image file you’re cropping. Click OK.
Note: It’s a good idea to keep backup copies of all your images before editing them.
- Adjust the crop handles until the bounding box surrounds the area of the image you want to keep.
- Double-click inside the bounding box or press Enter to crop the selection.
Creating Links
Dreamweaver provides several ways to create hypertext links to documents, images, multimedia files, or downloadable software. You can establish links to any text or image anywhere within a document, including text or images located in a heading, list, table, layer, or frame.
To create a link:
- Select text or an image on the page that you want users to click.
In the Property inspector, click the folder icon next to the Link box and select the destination page.
If you want to link to a page on another website, enter the page’s URL in the Link textbox.
Figure 23. The link field in the Property inspector
Creating Tables
Tables are a powerful tool for laying out text and graphics on a web page.
To create a table:
- Place the insertion point where you want the table to appear on the page.
Click the Table button on the Common tab of the Insert bar.
Figure 24. The insert table button on the Insert bar
Complete the Table dialog box and click OK.
Figure 25. The Table dialog box
- Add text and images to table cells the same way you add text and images to a page.
To format text in the entire table or in individual rows and columns:
Select the table or table element.
You can select the table or elements as follows:
To select the entire table, click the upper left corner of the table.
Figure 26. Selecting the entire table
- To select a row or part of a row, click the first cell and drag to the last cell.
- To select a column or part of a column, click the top cell and drag to the bottom cell.
- Apply formatting with the Property inspector.
To resize the whole table:
- Select the table and adjust the resize handles.
To change the width of a column:
- Drag the right border of the column.
To change the height of a row:
- Drag the lower border of the row.
To change properties that apply to the whole table:
- Select the table and make your adjustments in the Property inspector.
Figure 27. The table editing features in the Property inspector
Make sure you see all the table properties by clicking the expander arrow in the lower right corner of the inspector.
To change row, column, or cell properties:
- Select the table element and make your adjustments in the Property inspector.
To add a row or column:
- Click in an adjacent cell then select Modify > Table > Insert Rows or Columns.
To quickly add a row before the row that currently contains the insertion point:
- Press Control-M.
To delete a row or column:
- Select the row or column and press Delete.
Using Layout Mode to Position Text and Images
To ease the process of laying out pages, Dreamweaver provides a Layout mode, a special workspace that lets you draw layout table cells on your page. For example, you could draw a cell along the top of your page to hold a header graphic, another cell on the left side of the page to hold a navigation bar, and a third cell on the right to hold content, as follows.
Figure 28. Table layout mode
Before you can draw layout cells, you must switch from Standard mode to Layout mode. Select View > Table Mode > Layout Mode or click the Layout Mode button on the Insert bar’s Layout tab.
Figure 29. The Layout button
Once you’re in Layout mode, you can start drawing layout cells and tables.
To draw a layout table:
Click the Draw Layout Table button on the document toolbar.
Figure 30. The Draw Layout Table button
You need to draw a layout table to contain the layout cells.
Drag the mouse on the page to create the layout table.
Figure 31. Layout Table mode
Click the Draw Layout Cell button on the document toolbar.
Figure 32. The Draw Layout Cell button
Draw layout cells anywhere inside the table by dragging the mouse anywhere in the layout table.
The following example shows a layout table with three cells.
Figure 33. Layout mode with table cells
-
Add content to the layout cells by clicking in a cell and typing text or inserting other content.
You can add text, images, or other content the same way you add content to table cells in Standard mode.
Here’s the layout table after inserting a logo image:
Figure 34. The layout table with an image inserted
For more information, see “Laying Out Pages in Layout Mode” in Using Dreamweaver Help.
Using Predesigned Pages to Get a Head Start
In FrontPage, you can use predesigned pages called page templates as a starting point for your work. A page template may contain headings, links, and placeholder text; you tailor the content to meet your specific needs.
Dreamweaver also lets you choose from several professionally developed designs and use them as starting points for your websites.
To use a Dreamweaver page design:
Select File > New.
The New Document dialog box appears.
In the Category list, select Page Designs (CSS), Page Designs, or Page Designs (Accessible).
Select the design you want from the list of designs.
Dreamweaver displays a preview and a brief description of the design.
Figure 35. Sample page layouts
To use the design, click Create or double-click the item in the list.
A new document appears in the Document window.
- Choose File > Save to save the document.
If the file contains links to asset files, the Copy Dependent Files dialog box appears. Set options to copy the assets to your current site, then click Copy.
Making Quick Edits to Code
Dreamweaver lets you visually create and edit web pages without worrying about the underlying source code, but there are times when you might need to edit the code for greater control or to troubleshoot a page. Dreamweaver lets you edit some code while working in Design view.
You can use the tag selector to quickly select code you want to edit. The tag selector is in the status bar at the bottom of the Document window and shows a series of tags, as follows:
Figure 36. The tag selector
Note: FrontPage 2003 introduced a Quick Tag Selector that serves the same purpose as the tag selector in Dreamweaver,
To quickly select a tag in Design view:
Click in the document in Design view.
The tags that apply at the insertion point appear in the tag selector.
Click the tag you want in the tag selector to select it, or right-click the tag to display a number of editing options.
Figure 37. The tag selector contextual menu
You can use the Quick Tag Editor to quickly inspect and edit HTML tags without leaving Design view.
Note: FrontPage 2003 introduced a Quick Tag Editor that’s called the same thing and serves the same purpose as the one in Dreamweaver.
To quickly edit a tag using the Quick Tag Editor:
Do one of the following:
- Select a tag-based object in Design view and press Control-T.
- Right-click a tag in the tag selector and select Edit Tag from the pop-up menu.
The Quick Tag Editor opens in Edit Tag mode.
Figure 38.
- Enter new attributes, edit existing attributes, or edit the tag’s name. You can press Tab to move forward from one attribute to the next; press Shift-Tab to move back.
- When you’re done, press Enter.
- To exit without making any further changes, press Escape.
You can also edit tags in a property sheet similar to the ones found in integrated development environments (IDEs) such as Microsoft Visual Studio. In Dreamweaver, this property sheet is part of the Tag inspector.
To quickly edit a tag in the Tag inspector:
- Open the Tag inspector (Window > Tag Inspector).
Select a page element in Design view by either clicking it directly or clicking the corresponding tag in the tag selector.
If the element has attributes, Dreamweaver displays them and their current values in the Tag inspector’s property sheet.
Figure 39. The tag inspector
- Make the changes to the attributes in the property sheet. Click an attribute to type a value or, if the attribute takes predefined values, select one from a list. You can also change any CSS style applied to the element by clicking the Relevant CSS tab in the Tag inspector and selecting the CSS rule you want to modify.
- Click elsewhere in the panel or press Enter to update your page.
Working in Code View
Both Dreamweaver and FrontPage let you edit code directly in Code view. To switch to Code view in Dreamweaver, select View > Code or click the Code button on the toolbar.
Figure 40. Code view
The coding environment in Dreamweaver is designed for any type of web development, from writing simple HTML pages to developing and testing complex web applications. You can work on numerous file types in Code view, including HTML, VBScript, JavaScript, XML, CSS, Wireless Markup Language (WML), Extension Data Markup Language (EDML), and plain text. You can also work on a variety of server-side files, including ASP.NET Visual Basic, ASP.NET C#, ASP VBScript, ASP JavaScript, ColdFusion, JSP, and PHP. You can also write stand-alone C#, Visual Basic, and Java files. Dreamweaver has many tools to make coding more productive. For example, you can use the Insert bar to quickly drop code in your page to create common page elements.
Figure 41. Insert bar tool tips
You can find out what each icon on a tab does by placing the mouse over an icon and waiting for a tool tip to appear.
Editing Code in Code View
You can use Dreamweaver to edit your code more efficiently and with less errors. For example, you can use code hints to suggest code as you type in Code view.
To use code hints:
Start typing in Code view.
When you type certain characters, a list appears suggesting options to complete your entry.
Figure 42. Code hints
- Select an item in the list or press Enter to insert it in your code.
If you prefer to edit tags in a structured dialog box, you can use a tag editor.
To use a tag editor:
Right-click inside a tag in your code and select Edit Tag from the shortcut menu.
The tag editor for that tag appears.
Figure 43. The Tag editor dialog box
Make your edits in the dialog box and click OK.
Dreamweaver updates the tag in your code accordingly.
If you prefer to edit tags in a property sheet similar to the ones found in integrated development environments such as Microsoft Visual Studio, you can use the Tag inspector.
To use the Tag inspector:
- Open the Tag inspector (Window > Tag Inspector).
Click anywhere inside a tag in your code.
If the tag supports attributes, Dreamweaver displays them and their current values in the Tag inspector’s property sheet.
Figure 44. The tag inspector
Make the changes to the tag in the property sheet.
Click an attribute to type a value or, if the attribute takes predefined values, select one from a list.
You can also change any CSS style applied to the tag by clicking the Relevant CSS tab in the Tag inspector and selecting the CSS rule you want to modify.
- Click elsewhere in the panel or press Enter to update the tag in your code.
Customizing Your Coding Environment
You can modify the coding environment by clicking the View Options button on the toolbar.
Figure 45. Code view options
Select any of the following options from the menu:
- Word Wrap wraps the code so that you can view it without scrolling horizontally. This option doesn't insert line breaks; it just makes the code easier to view.
- Line Numbers displays line numbers alongside of the code.
- Highlight Invalid HTML highlights any invalid HTML in yellow.
- Syntax Coloring turns code coloring on and off.
- Auto Indent makes the code indent automatically when you press the Enter key.
Dreamweaver gives you full control over how your code looks. You can modify the format of the code by selecting Edit > Preferences and clicking the Code Format category in the Preferences dialog box. Here are some of your formatting options:
Figure 46. The Preferences dialog box
You can change the color scheme of the code by selecting Edit > Preferences and clicking the Code Coloring category in the Preferences dialog box. Various document types are listed on the right side of the dialog box. Select one from the list and click Edit Coloring Scheme. A dialog box appears that lets you change the color of different elements on the page.
Figure 47. The Edit Coloring Scheme dialog box
Taking the Next Steps
This article touched on the basic tools Dreamweaver provides for setting up a site, adding text and images, applying formatting, laying out pages, and working with code. The Dreamweaver toolbox contains many more trays, drawers, and compartments. To find out more about them, see the following topics in Using Dreamweaver Help.
- Lay out pages with CSS. You can use CSS to add content blocks to your document and position them with pixel-point accuracy. For more information, see “Laying Out Pages with CSS.”
- Create frames. Frames are regions in a browser window that can display an HTML document independent of what the rest of the browser window displays. For more information, see “Using Frames.”
- Add sights and sounds. Incorporate and edit multimedia files and objects, such as Macromedia Flash movies, Java applets, QuickTime, Active X, and audio files. For more information, see “Adding Audio, Video, and Interactive Elements.”
- Create more interactive pages. Add JavaScript behaviors such as image rollovers to let visitors interact more effectively with the page, change the page in various ways, or cause certain tasks to occur. For more information, see “Using JavaScript Behaviors.”
-
Use Dreamweaver templates. Create a unique look for an entire site and update it instantly with Dreamweaver templates. When you modify the design of a template, you immediately update the design of all the pages based on that template. For more information, see “Managing Templates.”
Note: FrontPage 2003 introduced Dynamic Web Templates that serve the same purpose as Dreamweaver templates. Dynamic Web Templates share the same syntax as Dreamweaver templates so you can move your FrontPage 2003 site to Dreamweaver or work on a site with FrontPage 2003 users.
- Manage your assets. Get a handle on all your site’s assets, including images, movies, colors, scripts, and links. You can track them in one central place using the Assets panel. For more information, see “Working with assets.”
- Store and reuse page elements. You can store all sorts of page elements in a library, including header and footers, images, tables, sounds, and Flash movies. Whenever you change a library item’s contents, you update all the pages that use the library item. For more information, see “Working with library items.”
- Develop web applications. Build dynamic, database-powered pages, including ASP.NET pages (using either Visual Basic .NET or C#), ASP pages (using either JavaScript or VBScript), ColdFusion pages, JSP pages, and PHP pages. For more information, see “Making Pages Dynamic.” For information on working with ASP.NET, see “Creating ASP.NET forms” and “Building ASP.NET Applications Rapidly.”